package com.hruiworks.campusgroup.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hruiworks.campusgroup.pojo.entity.University;
import com.hruiworks.campusgroup.service.UniversityService;
import com.hruiworks.campusgroup.dao.mapper.UniversityMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author jiushui
* @description 针对表【university】的数据库操作Service实现
* @createDate 2025-04-09 09:09:42
*/
@Service
public class UniversityServiceImpl extends ServiceImpl<UniversityMapper, University>
    implements UniversityService{

    @Resource
    private UniversityMapper universityMapper;

    @Override
    public List<University> pageUniversity(Long pageSize, Long current) {
        Page<University> queryPage = new Page<>();
        LambdaQueryWrapper<University> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        queryPage.setCurrent(current);
        queryPage.setSize(pageSize);
        Page<University> universityPage = universityMapper.selectPage(queryPage, lambdaQueryWrapper);
        return universityPage.getRecords();
    }
}




